$(document).ready(function() {
		$.formValidator.initConfig({
			formid : "form",
			debug : false,
			submitonce : true,
			onerror : function(msg, obj, errorlist) {
				alert(msg);
			}
		});

		$("#eamil").formValidator({
			onshow : "",
			onfocus : "邮箱地址",
			oncorrect : "邮箱有效"
		}).inputValidator({
			min : 6,
			empty : {
				leftempty : false,
				rightempty : false,
				emptyerror : "输入有误"
			},
			onerror : "输入有误"
		}).regexValidator({
			regexp : "email",
			datatype : "enum",
			onerror : "格式有误"
		});

		$("#nickName").formValidator({
			onshow : "",
			onfocus : "请填写有效用户名",
			oncorrect : "填写有效"
		}).inputValidator({
			min : 3,
			max : 15,
			onerror : "输入有误"
		}).regexValidator({
			regexp : "^[a-z0-9\u4e00-\u9efa5]{4,20}$",
			onerror : "格式有误"
		});

	});

	function test1(obj) {
		if (obj.value == "全角字符当做1个长度") {
			$.formValidator.getInitConfig("1").wideword = false;
			obj.value = "全角字符当做2个长度";
		} else {
			$.formValidator.getInitConfig("1").wideword = true;
			obj.value = "全角字符当做1个长度";
		}
	}